/*
 *   项目名称：rpc-demo
 *   文件名称：com.xiaolon.example.consumer.EasyConsumerExample
 *
 *   创建人：  ZHOU XIAO LONG
 *   创建日期：2024/12/3
 *
 */
package com.xiaolon.example.consumer;

import com.xiaolon.example.common.model.User;
import com.xiaolon.example.common.service.UserService;
import com.xiaolon.rpc.proxy.ServiceProxyFactory;

/*
 * 类描述：EasyConsumerExample
 */
public class EasyConsumerExample {
    public static void main(String[] args) {
        UserService userService = ServiceProxyFactory.getProxy(UserService.class);
        User user = new User();
        user.setName("xiaolon");
        User newUser = userService.getUser(user);
        if(newUser!=null){
            System.out.println(newUser.getName());
        }else {
            System.out.println("user == null");
        }
    }
}
